----------------------------------------------------------------------------------------------------------------------------------
--[[

    武器客制化伤害倍增
    需要hook 进 weapon 组件的 GetDamage 函数

]]--
----------------------------------------------------------------------------------------------------------------------------------
local hutao_com_weapon_get_damage_replace = Class(function(self, inst)
    self.inst = inst

end,
nil,
{

})

------------------------------------------------------------------------------------------------------------------------------
---
    function hutao_com_weapon_get_damage_replace:SetCustomFn(fn)
        self.__fn = fn
    end
    function hutao_com_weapon_get_damage_replace:ReplaceParam(weapon,attacker,target,damage,spdamage)
        if self.__fn then
            local _damage,_spdamage = self.__fn(weapon,attacker,target,damage,spdamage)
            damage = _damage or damage
            spdamage = _spdamage or spdamage
        end
        return damage,spdamage
    end
------------------------------------------------------------------------------------------------------------------------------
return hutao_com_weapon_get_damage_replace







